# 定义一个工具的函数，读取json文件数据，转换成[()]格式
import json

import pytest

from config import BASE_DIR

def read_json_data(filename):
    with open(filename,encoding="utf-8") as f:
        json_data = json.load(f)
        login_list = []
        for i in json_data:
            val = tuple(i.values())
            login_list.append(val)
        return login_list
if __name__ == '__main__':
    res = read_json_data(BASE_DIR+r"\data\login_data.json")
    res1 = read_json_data(BASE_DIR+r"\data\add_emp_data.json")
    # print(res)
    print(res1)
